package com.example.util;

/**
 * @Description: 存储线程工具类
 * @Author: mingtian
 * @CreateDate: 2020/12/10 17:25
 * @Version: 1.0
 */
public class LockContext {

    private static ThreadLocal<String> threadLocal = new ThreadLocal<String>();

    /**
     * 新增
     *
     * @param lockNode
     */
    public static void set(String lockNode) {
        threadLocal.set(lockNode);
    }

    /**
     * 获取
     *
     * @return
     */
    public static String get() {
        return threadLocal.get();
    }

    /**
     * 移除
     */
    public static void remove() {
        threadLocal.remove();
    }
}